import request from "@/utils/request";


// 分页查询类别列表
export function listCategorytByPage(data) {
  return request({
    url: '/category/page',
    method: 'post',
    data: data
  })
}

// 删除类别
export function delCategory(id) {
  return request({
    url: `/category/delete`,
    method: 'post',
    data:id,

  })
}


// 新增类别
export function addCategory(data) {
  return request({
    url: '/category/save',
    method: 'post',
    data: data
  })
}

// 修改类别
export function updateCategory(data) {
  return request({
    url: '/category/update',
    method: 'POST',
    data: data
  })
}